package ysq.xyg.web.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 网站模块-网站配置实体类
 *
 * @author shengQiang yu
 * @date 2019-6-5 21:54:50
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_web_config")
public class WebConfig implements Serializable{

	/**
     * id
     */ 
	@Id
	private String id;
	
	/**
     * 网站名称
     */ 
	@Column(name = "name")
	private String name;
	
	/**
     * 网站地址
     */ 
	@Column(name = "site_url")
	private String siteUrl;
	
	/**
     * 网站风格
     */ 
	@Column(name = "site_style")
	private String siteStyle;
	
	/**
     * 版权信息
     */ 
	@Column(name = "copyright")
	private String copyright;
	
	/**
     * logo图
     */ 
	@Column(name = "cover_image")
	private String coverImage;
	
	/**
     * 网站关键字
     */ 
	@Column(name = "seo_keyword")
	private String seoKeyword;
	
	/**
     * 网站描述
     */ 
	@Column(name = "description")
	private String description;
	
	/**
     * 网站备案号
     */ 
	@Column(name = "site_number")
	private String siteNumber;
	
	/**
     * 联系电话
     */ 
	@Column(name = "telephone")
	private String telephone;
	
	/**
     * 售后电话
     */ 
	@Column(name = "service_phone")
	private String servicePhone;
	
	/**
     * 官方微信
     */ 
	@Column(name = "wechat")
	private String wechat;
	
	/**
     * 官方qq
     */ 
	@Column(name = "qq")
	private String qq;
	
	/**
     * 邮箱
     */ 
	@Column(name = "email")
	private String email;
	
	/**
     * 地址
     */ 
	@Column(name = "address")
	private String address;
	
	/**
     * 用户id
     */ 
	@Column(name = "user_id")
	private String userId;
	
	/**
     * 删除标识：1、正常，2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;
	
	/**
     * 创建人
     */ 
	@Column(name = "create_user")
	private String createUser;
	
	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;
	
	/**
     * 修改人
     */ 
	@Column(name = "update_user")
	private String updateUser;
	
	/**
     * 修改时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;
	

	public WebConfig(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}